#ifndef _DRV_QSPI_H_    
#define _DRV_QSPI_H_

#include "evalsoc.h"



int qspi_test( void * parg, int argc, const char * argv[] );
int qspi_cmd_fast( void * parg, int argc, const char * argv[] );
int qspi_cmd_quad( void * parg, int argc, const char * argv[] );
int qspi_Quad();
int qspi_qe();
void qspi_xip_0();
int qspi_read_fast( dw_qspi_regs_t * pqspi, uint32_t cmd, uint32_t addr, int tlen, uint8_t * pdat );
int qspi_read_4_line( dw_qspi_regs_t * pqspi, uint8_t cmd, uint32_t offs, int tlen, uint8_t * pdat );
//flash qe enable
int qspi_qe_enable(dw_qspi_regs_t * pqspi);
int qspi_single_cmd( dw_qspi_regs_t * pqspi, uint8_t cmd );

int qspi_read_quad( dw_qspi_regs_t * pqspi, uint32_t offs, int tlen, uint8_t * pdat );


int flash_execute();



uint64_t time_make_timeout( uint32_t ticks );
int uart_try_getch( dw_uart_regs_t * puart );
int qspi_burn( dw_qspi_regs_t * pqspi, uint8_t * pdat, int tlen );
int qspi_load_flash( void * paddr, int tmax );
int qspi_read_ident( dw_qspi_regs_t * pqspi, uint32_t * pdat );
int load_xip_four_line(void);


#endif /* _DRV_QSOU_H_ */